1. Field of the Invention
The present invention relates generally to a computer system (hereinafter referred to as a “DB system”) that uses a database (hereinafter, abbreviated as a “DB”).
2. Description of Related Art
Currently, there are a lot of DB-based applications, and database management systems (hereinafter abbreviated as “DBMS”) for performing DB-related processing and management have been becoming increasingly important.
One feature of a DB is its handling of a large amount of data. Due to this feature, many DB systems using a DBMS have a configuration where a storage apparatus with large-capacity storage areas is connected to a computer running the DBMS, and data is stored in the storage apparatus.
In a system with this kind of configuration, since the data is stored in the storage apparatus, when the computer issues an IO command to the storage apparatus, the computer inevitably accesses a disk (a storage resource) in the storage apparatus. This data-access to the disk requires a mechanical operation such as data-seeking and takes much longer time compared to calculation, data transfer, and the like executed on a CPU or in a memory in the computer.
In that situation, it has been common for the storage apparatus to include a cache memory, and a controller in the storage apparatus stores data read from the disk in the cache memory, so if the same data is accessed later, the controller reads the data from the cache memory instead of the disk.
Also, an arrangement has been proposed in which a storage apparatus detects a sequence of data accesses (sequential access), predicts the data to be accessed next and pre-fetches the predicted data to a cache memory.
JP2003-150419 A discloses a technique in which, in order to increase the speed for accessing data in a database stored in a storage apparatus, the storage apparatus storing the DB data obtains, from the DBMS, DB schema location information, query execution information, and the like that will be needed for pre-fetch, and executes the pre-fetch within the storage apparatus.
In “Evaluation on pre-fetch mechanisms using access plans in high-function disks” (Mukai et. al. 11th Data Engineering Workshop (DEWS 2000): hosted by The Institute of Electronics, Information and Communication Engineers, Data Engineering Technical Group. Collection of papers and Lectures No. 3B-3, issued as a CD-ROM in July, 2000.), improvement of the performance of a DBMS by improving the function of a storage apparatus is discussed, taking as an example a DB using a relational database management system (RDBMS).
If a query processing execution plan in the RDBMS is provided to the storage apparatus as application level knowledge, the storage apparatus can read an index of a certain table in the RDBMS and then judge which block storing data for this table the storage apparatus should access.
In such an arrangement, the DBMS sequentially accesses indexes, and a computer running the DBMS ascertains block groups, each storing data in the tables corresponding to the indexes. By effectively scheduling the access to the block groups, the total access time for accessing data can be shortened.
However, in the above techniques, an existing storage apparatus needs to be greatly modified in order to shorten the time for a DB server to access DB data stored in the storage apparatus.
In light of this background, in the computer system disclosed in JP2005-258735 A, a pre-fetch server connected to a DB server and a storage apparatus obtains, from a DBMS, DB schema location information, query information and the information for the execution of the DBMS that will be needed for pre-fetch, identifies target data to be accessed by the DBMS based on the obtained information, and issues a command (pre-fetch I/O) to the storage apparatus to pre-fetch the target data so that the target data is staged to a cache in advance, thereby shortening the time required for processing an I/O issued from the DB server to the storage apparatus.
However, in the arrangement disclosed in JP2005-258735 A, as the number of queries the DB server needs to simultaneously execute (i.e., the multiplicity of queries) increases, pre-fetch I/Os from the pre-fetch server to the storage apparatus increase in addition to read I/Os from the DB server to the storage apparatus, which may result in the application of an even larger load on the storage apparatus, compared to the arrangement where pre-fetch is not performed.